/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// pdecwin.hpp - Decorated window class.
//
// Author: Kenneth G. Maxwell
//
// Copyright (c) 1997-2000 Swell Software 
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef _PEGDECWIN_
#define _PEGDECWIN_

/*--------------------------------------------------------------------------*/
// window style flags

class PegDecoratedWindow : public PegWindow
{
    public:
        PegDecoratedWindow(const PegRect &Rect, PEGULONG Style = FF_THICK);
        PegDecoratedWindow(PEGULONG Style = FF_THICK);
        virtual ~PegDecoratedWindow();

        virtual void Add(PegThing *What, PEGBOOL Show = TRUE);
        virtual void InitClient(void);
        PegMenuBar *MenuBar(void) { return mpMenuBar; }
        virtual PEGINT Message(const PegMessage &Mesg);
        virtual PegThing *Remove(PegThing *Who);

        void SetTitle(PEGINT StringId)
        {
            if (mpTitle)
            {
                mpTitle->DataSet(StringId);
            }
        }
        
        void SetTitle(const PEGCHAR* pText)
        {
            if (mpTitle)
            {
                mpTitle->DataSet(pText);
            }
        }

        PegStatusBar* StatusBar(void) 
        {
            return mpStatusBar;
        }
        const PEGCHAR *Title(void)
        {
            if (mpTitle)
            {
                return (mpTitle->DataGet());
            }
            return NULL;
        }
        PegTitle *TitleObject(void)
        {
            return mpTitle;
        }
        PegToolBar *ToolBar(void) 
        {
            return mpToolBar;
        }

    protected:
        PegTitle*      mpTitle;
        PegMenuBar*    mpMenuBar;
        PegStatusBar*  mpStatusBar;
        PegToolBar*    mpToolBar;
};


#endif

